//取出登录页面账号、密码
function handleLogin() {
    let username = u.value;
    let password = p.value;

    $.ajax({
        url: '/user/check',
        data: { username, password },
        success(r) {
            if (r == -4) {
                alert('账号被禁用');
            } else if (r == -3) {
                alert('账号被删除');
            } else if (r == -2) {
                alert('账号不匹配');
            } else if (r == -1) {
                alert('账号不存在');
            } else {
                alert('登录成功');
                location.href = '/';
            }
        },
    });
}
